package com.example.jpa.repository;

import com.example.jpa.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserRepository extends JpaRepository<User,Long> {

    //select * from user where username = ? and password = ?
    User findByUsernameAndPassword(String username,String password);

    //select * from user where username like ?
    List<User> findByUsernameLike(String username);

}
